package me.xiaoyan.java.spring.mapper;

import me.xiaoyan.java.spring.po.Account;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AccountMapper {
    public void insert(Account account);

    @Select("select * from account order by id desc limit #{count}")
    public List<Account> select(int count);

    @Select("select * from account where id = #{id}")
    public Account selectById(Integer id);

    @Select("select * from account order by id desc")
    public List<Account> selectAll();

    @Select("select * from account where account = #{account}")
    Account selectByAccount(String account);
    
}
